// layout 组件相关配置仓库

import { defineStore } from 'pinia'

let useLayoutSettingStore = defineStore('SettingStore', {
  state: () => {
    return {
      // 菜单是否折叠
      fold: false,
      // 标记刷新 main内容展示区
      refresh: false,
      // 主题颜色
      mainColor: ''
    }
  },
  actions: {
    // 菜单栏折叠变换
    changeFold() {
      this.fold = !this.fold
    },
    // 值变化即刷新一次，与true/false无关
    updateRefresh() {
      this.refresh = !this.refresh
    },
  },
})

export default useLayoutSettingStore
